package moon.excel.template;

import org.apache.poi.ss.usermodel.Cell;

public class TplCellWraper {

	private Cell cell;
	private int firstRow;
	private int lastRow;
	private int firstColumn;
	private int lastColumn;

	public TplCellWraper(Cell cell) {
		super();
		this.cell = cell;
		setMerge(cell.getRowIndex(), cell.getRowIndex(), cell.getColumnIndex(), cell.getColumnIndex());
	}

	public void setMerge(int firstRow, int lastRow, int firstColumn, int lastColumn) {
		this.firstRow = firstRow;
		this.lastRow = lastRow;
		this.firstColumn = firstColumn;
		this.lastColumn = lastColumn;
	}

	public Cell getCell() {
		return cell;
	}

	public void setCell(Cell cell) {
		this.cell = cell;
	}

	public int getFirstRow() {
		return firstRow;
	}

	public void setFirstRow(int firstRow) {
		this.firstRow = firstRow;
	}

	public int getLastRow() {
		return lastRow;
	}

	public void setLastRow(int lastRow) {
		this.lastRow = lastRow;
	}

	public int getFirstColumn() {
		return firstColumn;
	}

	public void setFirstColumn(int firstColumn) {
		this.firstColumn = firstColumn;
	}

	public int getLastColumn() {
		return lastColumn;
	}

	public void setLastColumn(int lastColumn) {
		this.lastColumn = lastColumn;
	}

	@Override
	public String toString() {
		return "TplCellDescribe [cell=" + cell + ", firstRow=" + firstRow + ", lastRow=" + lastRow + ", firstColumn=" + firstColumn + ", lastColumn=" + lastColumn + "]";
	}

}
